Sync dependent state when the workspace or live settings change - #22
Merged
Conversation
Memory tools, plan limits, audit/profile metadata, AGENTS.md behavior, and the app status bar now follow /cwd and update_settings instead of retaining boot-time captures.
Exercise SlashDispatcher._reload_behavior_for_workspace: non-TTY and declined /cwd set fail closed (old project rules dropped, new not loaded, global preserved), accept loads the new project AGENTS.md and persists its digest, and an already-trusted destination reloads without prompting. Also cover update_settings toggling skill_read registration as skills.enabled gains or loses entries.
…l_read Correct three drifted claims: max_plan_steps is now read live from PlanManager (section 10.4), the AGENTS.md trust-on-first-use gate re-runs on /cwd set for the new workspace (sections 16.2.1 and 36.4), and skill_read tool registration is refreshed live by update_settings rather than boot-only (section 17.3).
lavindeep
force-pushed
the
fix/workspace-config-atomicity
branch
from
July 10, 2026 12:26
f9d2182 to
264506f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/cwdcannot leave modeltools pointed at the previous project.
update_settingsrefreshes plan profile/max steps, audit profile, andskill_readregistration in step with the new settings, rather than holdingboot-time captures.
/cwd setre-runs the AGENTS.md trust-on-first-use gate for the new workspacebefore injecting any of its instructions: an already-trusted destination loads
silently, a new or changed one re-prompts (default No), and a non-TTY session
fails closed. Either way the previous workspace's project instructions are
dropped, so a switch into an untrusted repo can neither keep injecting the old
rules nor silently adopt the new ones. The always-trusted global AGENTS.md is
reloaded unchanged.
runtime.status().profileinstead of theboot-time settings binding.
This is dependency coherence — dependents are re-synced when the workspace or
live settings change — not transactional atomicity; there is no rollback across
writes.
Test plan
pytest(full suite; adds dispatcher-level coverage for the/cwdtrust-reload path — non-TTY/decline fail-closed, accept loads + persists the
digest, already-trusted no re-prompt — and for
update_settingstogglingskill_readregistration)ruff check ./ruff format --check ./mypy shellpilot --strict